import request from './http';

/**
 * ${tableInfo.tableComment} 前端接口
*/
export default class ${name}Api {
  static page(data: ${name}) {
    let { index, size, ...vo } = data;
    return request.post(`/${controllerName}/page/${r"${index}"}/${r"${size}"}`, vo);
  }

  static save(data: ${name}) {
    return request.post<${name}>('/${controllerName}', data);
  }

  static update(data: ${name}) {
    return request.put<${name}>('/${controllerName}', data);
  }

  static delete(ids: number[]) {
    return request.post('/${controllerName}/delete', ids);
  }

  static list(data: ${name}) {
    return request.post('/${controllerName}/list', data);
  }

  static getById(id: number) {
    return request.get(`/${controllerName}/get/${r"${id}"}`);
  }


}
